package main

import (
	"go-bff-scaffold/api"
	"go-bff-scaffold/router"
	"log"

	"github.com/gin-gonic/gin"
)

func main() {
	bff := api.GetBffServer("./conf/app_global.json", func(engine *gin.Engine) {
		router.Routers(engine)
	})
	if bff != nil {
		panic("GetBffServer is error")
	}
	// /数据裁剪测试
	userData := map[string]interface{}{
		"Name":    "daxiongjun",
		"Message": "hello world",
		"Gendor":  "M",
		"Age":     "23",
	}
	bffServiceDefine := api.NewGenericBffService("./data_conf/user_data_define.json")
	d := bffServiceDefine.FragmentData("mobile", userData)
	log.Println(d)
}
